@extends('layouts.admin')

@section('title', '用户列表')

@section('content')
    <div class="container">
        <p class="lead">用户列表
        </p>
        <div class="table-responsive">
            <table class="table table-bordered">
                <thead>
                <tr>
                    <th>编号</th>
                    <th>用户名</th>
                    <th>邮箱</th>
                    <th>姓名</th>
                    <th>公司</th>
                    <th>是否为管理员</th>
                </tr>
                </thead>
                <tbody>
                @foreach($users as $user)
                    <tr>
                        <td>{{ $user->id }}</td>
                        <td>{{ $user->username }}</td>
                        <td>{{ $user->email }}</td>
                        <td>{{ $user->name }}</td>
                        <td>{{ $user->company }}</td>
                        <td>{{ $user->isAdmin }}</td>
                    </tr>
                @endforeach
                </tbody>
            </table>
        </div>

        <div class="text-center">
            {!! $users->render() !!}
        </div>
    </div>
@stop